package com.sybase.dao;

/*
	Author: Leo
	Creation Date: 26-7-2012
	Creation Time: 11:28 PM
*/

import java.sql.*;

public class DBConnect {
	// Data member declaration
	private static final String dbClass = "com.sybase.jdbc4.jdbc.SybDriver";
	private static final String dbURL = "jdbc:sybase:Tds:leo-Studio-1555:5000?user=leo&password=syb_614ops&ServiceName=styx";
	Connection connection;
	
	// Constructor
	protected DBConnect() {
		connection = null;
	} // End of constructor
	
	protected Connection connectToSybase() {		
		try {
			Class.forName(dbClass);
			connection = DriverManager.getConnection(dbURL);
		} catch(SQLException sqle) {
			sqle.printStackTrace();
		} catch(ClassNotFoundException cnfe) {
			cnfe.printStackTrace();
		}
		
		return connection;
	} // End of method
	
} // End of class